home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / lib / gcc-lib / i486-unknown-sco3.2v5.0.0elf / 2.6-95q2 / include / oldstyle / stdlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-12  |  5.6 KB  |  195 lines

  1. /*
  2.  *   Copyright (C) 1984-1995 The Santa Cruz Operation, Inc.
  3.  *        All Rights Reserved.
  4.  *
  5.  *    The information in this file is provided for the exclusive use of
  6.  *    the licensees of The Santa Cruz Operation, Inc.  Such users have the
  7.  *    right to use, modify, and incorporate this code into other products
  8.  *    for purposes authorized by the license agreement provided they include
  9.  *    this notice and the associated copyright notice with any such product.
  10.  *    The information in this file is provided "AS IS" without warranty.
  11.  */
  12.  
  13. /*    Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
  14. /*    Portions Copyright (c) 1979 - 1990 AT&T   */
  15. /*      All Rights Reserved   */
  16.  
  17. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF          */
  18. /*    UNIX System Laboratories, Inc.                          */
  19. /*    The copyright notice above does not evidence any        */
  20. /*    actual or intended publication of such source code.     */
  21.  
  22. #ifndef _STDLIB_H
  23. #ifndef _PARAMS
  24. #if defined(__STDC__) || defined(__cplusplus)
  25. #define _PARAMS(ARGS) ARGS
  26. #else
  27. #define _PARAMS(ARGS) ()
  28. #endif
  29. #endif /* _PARAMS */
  30. #define _STDLIB_H
  31.  
  32. #ident "oldstyle @(#) stdlib.h 20.1 94/12/04 "
  33.  
  34.  
  35. #pragma pack(4)
  36.  
  37. #ifndef _DIV_T
  38. #define _DIV_T
  39. typedef    struct
  40. {
  41.     int    quot;
  42.     int    rem;
  43. } div_t;
  44. #endif
  45.  
  46. #ifndef _LDIV_T
  47. #define _LDIV_T
  48. typedef struct
  49. {
  50.     long    quot;
  51.     long    rem;
  52. } ldiv_t;
  53. #endif
  54.  
  55. #ifndef _SIZE_T
  56. #define _SIZE_T
  57. typedef unsigned int    size_t;
  58. #endif
  59.  
  60. #if !defined(_SSIZE_T)
  61. #define _SSIZE_T
  62. typedef int    ssize_t;
  63. #endif
  64.  
  65. #ifndef _WCHAR_T
  66. #define _WCHAR_T
  67. typedef long    wchar_t;
  68. #endif
  69.  
  70. #ifndef NULL
  71. #define NULL    0
  72. #endif /* NULL */
  73.  
  74. #define EXIT_FAILURE    1
  75. #define EXIT_SUCCESS    0
  76. #define RAND_MAX    077777
  77.  
  78.  
  79. /* From sys/wait.h */
  80. #define WNOHANG          0001
  81. #define WUNTRACED   0002
  82. #define WEXITSTATUS(sv)  ((sv >> 8) & 0xff)
  83. #define WIFEXITED(sv)    ((sv & 0xff) == 0)
  84. #define WIFSIGNALED(sv)  ((sv) && (sv == (sv & 0x00ff)))
  85. #define WIFSTOPPED(sv)   ((sv & 0xff) == 0177)
  86. #define WSTOPSIG(sv)     ((sv >> 8) & 0xff)
  87. #define WTERMSIG(sv)     (sv & 0x7f)
  88.  
  89.  
  90. extern unsigned char    _ctype[];
  91.  
  92. #define MB_CUR_MAX    ((int)_ctype[520])
  93.  
  94. extern double    atof _PARAMS((const char *));
  95. extern int    atoi _PARAMS((const char *));
  96. extern long    atol _PARAMS((const char *));
  97. extern double    strtod _PARAMS((const char *, char **));
  98. extern float    strtof();
  99. extern long    strtol _PARAMS((const char *, char **, int));
  100. extern unsigned long    strtoul _PARAMS((const char *, char **, int));
  101.  
  102. extern int    rand();
  103. extern void    srand _PARAMS((unsigned int));
  104.  
  105. extern char    *calloc _PARAMS((__SIZE_TYPE__ , __SIZE_TYPE__ ));
  106. extern void    free _PARAMS((void *));
  107. extern char    *malloc _PARAMS((__SIZE_TYPE__ ));
  108. extern char    *realloc _PARAMS((void *, __SIZE_TYPE__ ));
  109.  
  110. extern void    abort();
  111. extern int    atexit _PARAMS((void (*) (void)));
  112. extern void    exit _PARAMS((int));
  113. extern char    *getenv _PARAMS((const char *));
  114. extern int    system _PARAMS((const char *));
  115.  
  116. extern char    *bsearch _PARAMS((const void *, const void *, __SIZE_TYPE__ , __SIZE_TYPE__ , int (*) (const void *, const void *)));
  117. extern void    qsort _PARAMS((void *, __SIZE_TYPE__ , __SIZE_TYPE__ , int (*) (const void *, const void *)));
  118.  
  119. extern int    abs _PARAMS((int));
  120. extern div_t    div _PARAMS((int, int));
  121. extern long    labs _PARAMS((long int));
  122. extern ldiv_t    ldiv _PARAMS((long int, long int));
  123.  
  124. extern int    mbtowc _PARAMS((__WCHAR_TYPE__ *, const char *, __SIZE_TYPE__ ));
  125. extern int    mblen _PARAMS((const char *, __SIZE_TYPE__ ));
  126. extern int    wctomb _PARAMS((char *, __WCHAR_TYPE__ ));
  127.  
  128. extern size_t    mbstowcs _PARAMS((__WCHAR_TYPE__ *, const char *, __SIZE_TYPE__ ));
  129. extern size_t    wcstombs _PARAMS((char *, const __WCHAR_TYPE__ *, __SIZE_TYPE__ ));
  130.  
  131. extern long    a64l _PARAMS((const char *));
  132. extern int    dup2 _PARAMS((int, int));
  133. extern char    *ecvt _PARAMS((double, int, int *, int *));
  134. extern char    *ecvtl();
  135. extern char    *fcvt _PARAMS((double, int, int *, int *));
  136. extern char    *fcvtl();
  137. extern char    *getcwd _PARAMS((char *, __SIZE_TYPE__ ));
  138. extern char    *getlogin();
  139. extern int    getopt _PARAMS((int, char *const *, const char *));
  140. extern int    getsubopt _PARAMS((char **, char *const *, char **));
  141. extern char    *optarg;
  142. extern int    optind, opterr, optopt;
  143. extern char    *getpass _PARAMS((const char *));
  144. extern int    getpw _PARAMS((int, char *));
  145. extern char    *gcvt _PARAMS((double, int, char *));
  146. extern char    *gcvtl();
  147. extern int    grantpt();
  148. extern char    *initstate _PARAMS((unsigned, char *, int));
  149. extern int    isatty _PARAMS((int));
  150. extern void    l3tol _PARAMS((long int *, const char *, int));
  151. extern char    *l64a _PARAMS((long int));
  152. extern char    *l64a_r();
  153. extern void    ltol3 _PARAMS((char *, const long int *, int));
  154. extern char    *memalign _PARAMS((__SIZE_TYPE__ , __SIZE_TYPE__ ));
  155. extern int    mkstemp _PARAMS((char *));
  156. extern char    *mktemp _PARAMS((char *));
  157. extern int    rand_r();
  158. extern char    *ptsname();
  159. extern long    random();
  160. extern void    srandom _PARAMS((int));
  161. extern char    *realpath _PARAMS((char *, char *));
  162. extern void    swab _PARAMS((const char *, char *, int));
  163. extern char    *ttyname _PARAMS((int));
  164. extern int    ttyslot();
  165. extern int    unlockpt();
  166. extern char    *valloc _PARAMS((__SIZE_TYPE__ ));
  167. extern double    wcstod();
  168. extern float    wcstof();
  169. extern long    wcstol();
  170. extern long double    wcstold();
  171. extern unsigned long    wcstoul();
  172.  
  173.  
  174.  
  175. extern int    putenv _PARAMS((char *));
  176. extern double    drand48();
  177. extern double    erand48 _PARAMS((short unsigned int *));
  178. extern long    jrand48 _PARAMS((short unsigned int *));
  179. extern void    lcong48 _PARAMS((short unsigned int *));
  180. extern long    lrand48();
  181. extern long    mrand48();
  182. extern long    nrand48 _PARAMS((short unsigned int *));
  183. extern unsigned short    *seed48 _PARAMS((short unsigned int *));
  184. extern void    setkey _PARAMS((const char *));
  185. extern void    srand48 _PARAMS((long int));
  186.  
  187.  
  188.  
  189. #define mblen(s, n)    mbtowc((wchar_t *)0, s, n)
  190.  
  191.  
  192. #pragma pack()
  193.  
  194. #endif /* _STDLIB_H */
  195.